from django.conf.urls import url
from rest_framework.routers import DefaultRouter
from . import views



urlpatterns = [
    url(r'new_list/(?P<category_id>\d+)/$',views.NewsListView.as_view()),       #获取新闻列表
    url(r'news/(?P<news_id>\d+)/$',views.NewsDetailsView.as_view()),            #获取新闻详情
    url(r'new_category/$',views.Newcategory.as_view()),
    url(r'news/submit/$', views.submitNewsViewSet.as_view()),                  #发布新闻
]
